﻿Public Class clsTmj

    Public Function update_tmj_prod_no_write(prod_no As Integer, task_step_id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set tmj_prod_no_write = ?, tmj_prod_no_write_time = (SELECT CURRENT_TIMESTAMP(6)) where task_step_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1， prod_no, task_step_id)
        Return rtn
    End Function
    Public Function update_tmj_arrive_write(tmj_arrive As Boolean, task_step_id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set tmj_arrive_write = ?, tmj_arrive_write_time = (SELECT CURRENT_TIMESTAMP(6)) where task_step_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1， tmj_arrive, task_step_id)
        Return rtn
    End Function
    Public Function update_tmj_pick_read(tmj_pick As Boolean, task_step_id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set tmj_pick_read = ?, tmj_pick_read_time = (SELECT CURRENT_TIMESTAMP(6)) where task_step_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1， tmj_pick, task_step_id)
        Return rtn
    End Function
    Public Function update_agv_start1(agv_start1 As Integer, task_step_id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set agv_start1 = ?, agv_start1_time = (SELECT CURRENT_TIMESTAMP(6)) where task_step_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1， agv_start1, task_step_id)
        Return rtn
    End Function

    Public Function update_tmj_stop_write(tmj_stop_write As Boolean, task_step_id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set tmj_stop_write = ?, tmj_stop_write_time = (SELECT CURRENT_TIMESTAMP(6)) where task_step_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1， tmj_stop_write, task_step_id)
        Return rtn
    End Function
    Public Function update_tmj_drop_read(tmj_drop_read As Boolean, task_step_id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set tmj_drop_read = ?, tmj_drop_read_time = (SELECT CURRENT_TIMESTAMP(6)) where task_step_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1， tmj_drop_read, task_step_id)
        Return rtn
    End Function

    Public Function update_tmj_received_write(tmj_received_write As Boolean, task_step_id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set tmj_received_write = ?, tmj_received_write_time = (SELECT CURRENT_TIMESTAMP(6)) where task_step_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1， tmj_received_write, task_step_id)
        Return rtn
    End Function

    Public Function update_agv_start2(agv_start2 As Integer, task_step_id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set agv_start2 = ?, agv_start2_time = (SELECT CURRENT_TIMESTAMP(6)) where task_step_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1， agv_start2, task_step_id)
        Return rtn
    End Function

End Class
